package ${packageCode}.api.vx.${moduleMapperCode}.${(businessCode?uncap_first)!''}

import org.apache.commons.lang3.StringUtils
import ${packageCode}.${moduleMapperCode}.service.${businessCode}Service
import top.cardone.context.ApplicationContextHolder
import top.cardone.core.CodeException

class modify implements java.io.Serializable {
    def input(input) {
        ["${(businessCode?uncap_first)!''}Id": input.${(businessCode?uncap_first)!''}Id]
    }

    def validation(input) {
//      if (StringUtils.isBlank(input?.${(businessCode?uncap_first)!''}Id)) {
//          throw new CodeException("${(businessCode?uncap_first)!''}Id required", "${businessName}标识必填")
//      }
    }

    def func(input) {
		ApplicationContextHolder.getBean(${businessCode!''}Service.class).findOneBySqlFileName("page.find", input)
    }

    def output(output) {
        def newOutput = [:]

<#if entityMapper.fieldMapperMap??>
    <#list entityMapper.fieldMapperMap?values as fieldMapper>
		newOutput?.${fieldMapper.code} = output?.${fieldMapper.columnName}
    </#list>
</#if>

        newOutput
    }
}